import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.BufferedImage;

import javax.swing.JComponent;


public class JpegPanel extends JComponent {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6096800483515469435L;

	public Image image ;
	public BufferedImage bi ;
	public Graphics g2 ;

	public JpegPanel(){
		super();
		setSize(new Dimension(640, 480));
		bi = new BufferedImage(640, 480, BufferedImage.TYPE_INT_RGB);
		g2 = bi.createGraphics();
	}
	
	
	public void paintComponent(Graphics g) {
		super.paintComponent(g);
		g2.drawImage(image, 0, 0, this);
		g.drawImage(bi, 0, 0, this);
	}

	public void setImage(Image img) {
		image = img ;
	}
}
